package com.example.java.Mapper;

import com.example.java.Entity.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginMapper {
    //    通过用户名查询
    @Select("select * from `admin` where username = #{username}")
    Admin allUser(@Param("username") String username, String password);

    //    添加用户
    @Insert("INSERT into `admin` (username,password) VALUES (#{username},#{password})")
    int insert(Admin admin);
}
